Linux Shell Script

How to add two numbers in Linux Shell Script | Linux Shell Script

How to add two numbers in Linux Shell Script | Linux Shell Script

How to add two numbers in Linux Shell Script | Linux Shell Script

We will create a shell script program to add two integer numbers and then print the sum of numbers on the console screen.

#!/bin/bash



num1=110
num2=500

num3=`expr $num1 + $num2`

echo "Sum is: $num3"
TutorialsLink Curator

This is an official account managed by the team TutorialsLink Community